<template>
    <div class="demo">
        <h2>学校名称：{{ schoolName }}</h2>
        <h2>学校地址：{{ schoolAddress }}</h2>
        <button @click="alertName">点我弹学校名称+地址</button>
        <hr>
        <h2 @click="alertMsgName">点击名字：{{ name }}，弹窗</h2>
    </div>
</template>

<script>
// 导入混入
import { mixin } from '../mixin.js'

export default {
  name: 'School',
  data () {
    return {
      schoolName: '西南财经',
      schoolAddress: '四川成都',
      name: '哈哈哈'
    }
  },
  methods: {
    alertName () {
      alert(this.schoolName + ',' + this.schoolAddress)
    }
  },
  mixins: [mixin]
}
</script>

<style>
    .demo{
        background-color: skyblue;
    }
</style>
